"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = TagExample;

var _react = _interopRequireDefault(require("react"));

var _components = require("@tarojs/components");

var _index = _interopRequireDefault(require("../../index"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function TagExample() {
  var records = [{
    name: 'Mario',
    stage: '22数',
    marriage: 0
  }, {
    name: 'Luigi',
    age: 38,
    stage: 'youth',
    marriage: 0
  }, {
    name: 'Koopa',
    age: 28,
    stage: 'youth',
    marriage: 1
  }, {
    name: 'Yoshi',
    age: 18,
    stage: 'youth',
    marriage: 0
  }, {
    name: 'Link',
    age: 8,
    stage: 'middle-aged',
    marriage: 2
  }, {
    name: 'Zelda',
    age: 58,
    stage: 'middle-aged',
    marriage: 1
  }, {
    name: 'Wario',
    age: 68,
    stage: 'elder',
    marriage: 3
  }, {
    name: 'Pikachu',
    age: 78,
    stage: 'elder',
    marriage: 4
  }];
  var columns1 = [{
    key: 'age',
    name: '年龄'
  }, {
    key: 'name',
    name: '姓名'
  }, {
    key: 'desc',
    name: '描述',
    render: function render() {
      return 'Lorem ipsum';
    }
  }];
  var columns2 = [{
    key: 'age',
    name: '年龄' // width: '90',

  }, {
    key: 'name',
    name: '姓名',
    width: '80'
  }, {
    key: 'stage',
    name: '年龄段'
  }, {
    key: 'stage',
    name: '性别' // width: '150',

  }, {
    key: 'marriage',
    name: '婚姻状态' // width: '33.3%',

  }, {
    key: 'desc',
    name: '描述',
    // width: 180,
    render: function render() {
      return 'Lorem ipsum';
    }
  }];
  var columns3 = [{
    key: 'age',
    name: '年龄',
    width: '123'
  }, {
    key: 'name',
    name: '姓名',
    width: '80',
    fixed: 'left'
  }, {
    key: 'stage',
    name: '年龄段',
    width: '90'
  }, {
    key: 'stage',
    name: '性别',
    width: '123',
    fixed: 'left'
  }, {
    key: 'marriage',
    name: '婚姻状态',
    width: '223'
  }, {
    key: 'desc',
    name: '描述',
    width: 180,
    render: function render() {
      return 'Lorem ipsum';
    }
  }];
  return /*#__PURE__*/_react.default.createElement(_components.View, {
    className: "page"
  }, /*#__PURE__*/_react.default.createElement(_components.Text, {
    className: "header"
  }, "Table"), /*#__PURE__*/_react.default.createElement(_components.View, {
    className: "section"
  }, /*#__PURE__*/_react.default.createElement(_components.View, {
    className: "header",
    style: {
      marginTop: 50
    }
  }, "\u57FA\u7840\u4F7F\u7528 "), /*#__PURE__*/_react.default.createElement(_components.View, null, /*#__PURE__*/_react.default.createElement(_index.default, {
    columns: columns1,
    dataSource: records
  })), /*#__PURE__*/_react.default.createElement(_components.View, {
    className: "header",
    style: {
      marginTop: 50
    }
  }, "\u56FA\u5B9A\u8868\u5934 "), /*#__PURE__*/_react.default.createElement(_components.View, null, /*#__PURE__*/_react.default.createElement(_index.default, {
    columns: columns2,
    dataSource: records,
    maxScrollHeight: 200
  })), /*#__PURE__*/_react.default.createElement(_components.View, {
    className: "header",
    style: {
      marginTop: 50
    }
  }, "\u56FA\u5B9A\u5217 "), /*#__PURE__*/_react.default.createElement(_components.View, null, /*#__PURE__*/_react.default.createElement(_index.default, {
    columns: columns3,
    dataSource: records
  }))));
}